// import VueRouter from "vue-router";
// import Home from "@/pages/home/index.vue"
// import Manage from "@/pages/manage/index.vue"
import { createRouter, createWebHashHistory } from 'vue-router';


const routes = [
    { path: '/', redirect: "/home" },
    { path: '/home', component: () => import("@/pages/home/index.vue") },
    { path: '/net', component: () => import("@/pages/net/index.vue") },
    { path: '/manage', component: () => import("@/pages/manage/index.vue") },
    { path: '/login', component: () => import("@/pages/login/index.vue") },
    { path: '/video', component: () => import("@/pages/video/index.vue") },
    { path: '/download', component: () => import("@/pages/download/index.vue") },
    { path: '/log', component: () => import("@/pages/log/index.vue") },
    { path: '/image', component: () => import("@/pages/image/index.vue") },
]

// 3. 创建路由实例并传递 `routes` 配置
// 你可以在这里输入更多的配置，但我们在这里
// 暂时保持简单
export const router = createRouter({
    // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
    history: createWebHashHistory(),
    routes, // `routes: routes` 的缩写
})